#pragma once

#include <iostream>
#include <cstdlib>
#include <map>
#include <iomanip>

//#define __SELECT__

#if defined(_MSC_VER)
    #ifdef SNETWORK_EXPORTS
        #define SNETWORK_API __declspec(dllexport)
        #define SNETWORK_API_C  extern "C" __declspec(dllexport)
    #else
        #define SNETWORK_API __declspec(dllimport)
        #define SNETWORK_API_C  extern "C" __declspec(dllimport)
    #endif
#elif defined(__GNUC__)
    #define SNETWORK_API
    #define SNETWORK_API_C
#endif

#if defined(__GNUC__)
    #include <cstdio>
    #include <cstring>
    #include <netdb.h>
    #include <fstream>
    #include <iomanip>
    #include <sys/types.h>
    #include <sys/socket.h>
    #include <sys/stat.h>
    #include <netinet/in.h>
    #include <arpa/inet.h>
    #include <sys/epoll.h> 
    #include <fcntl.h>
    #include <unistd.h>
    #include <signal.h>
    #include <errno.h>
    #include <pthread.h>
    #include <ctime>
    #include <sys/types.h>
    #include <sys/sendfile.h>
    
#elif defined(_MSC_VER)

    #include "targetver.h"
	#pragma comment(lib,"standard.lib")
	#pragma comment(lib,"Theadlib.lib")
	#pragma comment(lib,"adolib1.lib")

    #define WIN32_LEAN_AND_MEAN
    #include <io.h>
    #include <stdio.h>
    #include "winsock2.h"
    #include "windows.h"
    #include <ws2tcpip.h>
    #ifdef SNETWORK_EXPORTS
    #define SNETWORK_API __declspec(dllexport)
    #else
    #define SNETWORK_API __declspec(dllimport)
    #endif
#endif
